<?php

namespace App\Http\Controllers\Backend;

use App\Http\Controllers\Controller;

class SettingController extends Controller
{
    public function index(){

        //dd(setting()->all());
        return view('backend.setting.index');
    }

    public function saveHandler(){
        $data = \request()->all();
        unset($data['_token']);
        $data = array_where($data,function ($value,$key){
            return $value != null ;
        });

        setting($data)->save();
        flash('修改成功','success');
        return back();
    }
}
